package com.hjh.dubbo.demo1.consume.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.hjh.dubbo.demo1.api.service.DemoService;
import com.reger.dubbo.annotation.Inject;

@RestController
public class TestController {

	@Inject
	DemoService service;

	@GetMapping("/test1")
	public String getTest() {

		Integer addResult = service.add(100, 1);

		String value = addResult == null ? "0" : "" + addResult.intValue();
		System.err.println("dubbo consume result:" + value);
		return "dubbo demo1:" + value;
	}
}
